package design._01_factory.general2;

import java.lang.reflect.InvocationTargetException;

import design._01_factory.simple1._01.XMLUtil;

public class Client {
	public static void main(String args[]) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
		LoggerFactory factory;
		Logger logger;
		//factory = new FileLoggerFactory(); //可引入配置文件实现
		String type = XMLUtil.getChartType(); //读取配置文件中的参数
		factory =  (LoggerFactory) Class.forName(type).newInstance();		
		logger = factory.createLogger();
		logger.writeLog();
	}
}
